﻿<Window x:Class="Bio.Views.Alignment.Views.GotoRefSeqColumnView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:julmar="http://www.julmar.com/wpfhelpers" 
        xmlns:Interactivity="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" 
        Title="Jump to Reference Nucelotide" FocusManager.FocusedElement="{Binding ElementName=tb}"
        WindowStartupLocation="CenterOwner" Background="#FF595959" ShowInTaskbar="False" 
        ResizeMode="NoResize"  Height="240" Width="500">
    
    <Grid Margin="5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Label Content="Reference Sequence:" Target="{Binding ElementName=rs}" VerticalAlignment="Center" Padding="5" />
        <ComboBox x:Name="rs" Grid.Column="1"  HorizontalAlignment="Stretch" Margin="5,0" 
                  ItemsSource="{Binding ReferenceSequences}" DisplayMemberPath="Header"
                  SelectedItem="{Binding SelectedReferenceSequence}" VerticalAlignment="Center" Padding="5" />

        <Label Grid.Row="1" Content="_Goto Reference Nuceleotide:" Target="{Binding ElementName=tb}" VerticalAlignment="Center" Padding="5" />
        <TextBox x:Name="tb" Grid.Row="1" Grid.Column="1" MinWidth="100" Text="{Binding Position, UpdateSourceTrigger=PropertyChanged}" 
                 HorizontalAlignment="Left" Margin="5,0" VerticalAlignment="Center" Padding="5">
            <Interactivity:Interaction.Behaviors>
                <julmar:NumericTextBoxBehavior AllowMouseDrag="true" />
            </Interactivity:Interaction.Behaviors>
        </TextBox>

        <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right">
            <Button Content="OK" IsDefault="True" Padding="10,5" Margin="10" MinWidth="100" VerticalAlignment="Center">
                <Interactivity:Interaction.Behaviors>
                    <julmar:CloseDialogBehavior DialogResult="true" />
                </Interactivity:Interaction.Behaviors>
            </Button>
            <Button Content="Cancel" IsCancel="True" Padding="10,5" Margin="10" MinWidth="100" VerticalAlignment="Center" />
        </StackPanel>
    </Grid>
</Window>
